package com.allo2o.common.convertor;

import com.allo2o.common.VO.MerchantCashesVO;
import com.allo2o.common.domain.MerchantCashesDO;

/**
 * Created by lubingbing on 16-5-6.
 */
public class MerchantCashesConvert {
    public static MerchantCashesDO VO2DOConvert(MerchantCashesVO vo) {
        if (vo == null) {
            return null;
        }
        MerchantCashesDO dto = new MerchantCashesDO();
        dto.setGmtCreate(vo.getGmtCreate());
        dto.setCashAmount(vo.getCashAmount());
        dto.setGmtModify(vo.getGmtModify());
        dto.setHandlerAccount(vo.getHandlerAccount());
        dto.setId(vo.getId());
        dto.setMerchantId(vo.getMerchantId());
        return dto;
    }

    public static MerchantCashesVO DO2VOConvert(MerchantCashesDO dto) {
        if (dto == null) {
            return null;
        }
        MerchantCashesVO vo = new MerchantCashesVO();
        vo.setMerchantId(dto.getMerchantId());
        vo.setId(vo.getId());
        vo.setHandlerAccount(dto.getHandlerAccount());
        vo.setGmtModify(dto.getGmtModify());
        vo.setCashAmount(dto.getCashAmount());
        vo.setMerchantId(dto.getMerchantId());
        return vo;
    }
}
